package com.manager.kudian.system.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * AccountStatement entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "account_statement")
public class AccountStatement implements java.io.Serializable {

	// Fields

	private Integer asId;
	private String asDay;
	private Timestamp addTime;
	private Boolean asStatus;
	private Integer sellerId;
	private Boolean isPay;
	private Timestamp payTime;
	private Double asAmount;
	private Double ordersAmount;
	private Double fee;
	private Boolean isConfirm;
	private Timestamp confirmTime;
	private Integer userId;

	// Constructors

	/** default constructor */
	public AccountStatement() {
	}

	/** minimal constructor */
	public AccountStatement(String asDay, Timestamp addTime, Boolean asStatus,
			Integer sellerId, Boolean isPay, Timestamp payTime,
			Double asAmount, Double ordersAmount, Double fee,
			Boolean isConfirm, Integer userId) {
		this.asDay = asDay;
		this.addTime = addTime;
		this.asStatus = asStatus;
		this.sellerId = sellerId;
		this.isPay = isPay;
		this.payTime = payTime;
		this.asAmount = asAmount;
		this.ordersAmount = ordersAmount;
		this.fee = fee;
		this.isConfirm = isConfirm;
		this.userId = userId;
	}

	/** full constructor */
	public AccountStatement(String asDay, Timestamp addTime, Boolean asStatus,
			Integer sellerId, Boolean isPay, Timestamp payTime,
			Double asAmount, Double ordersAmount, Double fee,
			Boolean isConfirm, Timestamp confirmTime, Integer userId) {
		this.asDay = asDay;
		this.addTime = addTime;
		this.asStatus = asStatus;
		this.sellerId = sellerId;
		this.isPay = isPay;
		this.payTime = payTime;
		this.asAmount = asAmount;
		this.ordersAmount = ordersAmount;
		this.fee = fee;
		this.isConfirm = isConfirm;
		this.confirmTime = confirmTime;
		this.userId = userId;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "as_id", unique = true, nullable = false)
	public Integer getAsId() {
		return this.asId;
	}

	public void setAsId(Integer asId) {
		this.asId = asId;
	}

	@Column(name = "as_day", nullable = false, length = 8)
	public String getAsDay() {
		return this.asDay;
	}

	public void setAsDay(String asDay) {
		this.asDay = asDay;
	}

	@Column(name = "add_time", nullable = false, length = 19)
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	public Timestamp getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Timestamp addTime) {
		this.addTime = addTime;
	}

	@Column(name = "as_status", nullable = false)
	public Boolean getAsStatus() {
		return this.asStatus;
	}

	public void setAsStatus(Boolean asStatus) {
		this.asStatus = asStatus;
	}

	@Column(name = "seller_id", nullable = false)
	public Integer getSellerId() {
		return this.sellerId;
	}

	public void setSellerId(Integer sellerId) {
		this.sellerId = sellerId;
	}

	@Column(name = "is_pay", nullable = false)
	public Boolean getIsPay() {
		return this.isPay;
	}

	public void setIsPay(Boolean isPay) {
		this.isPay = isPay;
	}

	@Column(name = "pay_time", nullable = false, length = 19)
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	public Timestamp getPayTime() {
		return this.payTime;
	}

	public void setPayTime(Timestamp payTime) {
		this.payTime = payTime;
	}

	@Column(name = "as_amount", nullable = false, precision = 10)
	public Double getAsAmount() {
		return this.asAmount;
	}

	public void setAsAmount(Double asAmount) {
		this.asAmount = asAmount;
	}

	@Column(name = "orders_amount", nullable = false, precision = 10)
	public Double getOrdersAmount() {
		return this.ordersAmount;
	}

	public void setOrdersAmount(Double ordersAmount) {
		this.ordersAmount = ordersAmount;
	}

	@Column(name = "fee", nullable = false, precision = 10)
	public Double getFee() {
		return this.fee;
	}

	public void setFee(Double fee) {
		this.fee = fee;
	}

	@Column(name = "is_confirm", nullable = false)
	public Boolean getIsConfirm() {
		return this.isConfirm;
	}

	public void setIsConfirm(Boolean isConfirm) {
		this.isConfirm = isConfirm;
	}

	@Column(name = "confirm_time", length = 19)
	public Timestamp getConfirmTime() {
		return this.confirmTime;
	}

	public void setConfirmTime(Timestamp confirmTime) {
		this.confirmTime = confirmTime;
	}

	@Column(name = "user_id", nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

}